home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 October: Mac OS SDK / Dev.CD Oct 00 SDK1.toast / Development Kits / Mac OS / Display Manager SDK / Sample Code / Display Changed CWPro3 / Headers / Proto.h < prev   
Encoding:
C/C++ Source or Header  |  1997-01-04  |  4.7 KB  |  146 lines  |  [TEXT/CWIE]

  1. /***********************************************************************
  2. #
  3. #        Proto.h
  4. #
  5. #        This file contains the prototypes for the apps procs and funcs
  6. #
  7. #        Author: Michael Marinkovich
  8. #                Apple Developer Technical Support
  9. #
  10. #
  11. #        Modification History: 
  12. #
  13. #            6/4/95        MWM     Initial coding                     
  14. #            10/12/95    MWM        cleaned up
  15. #
  16. #        Copyright © 1992-95 Apple Computer, Inc., All Rights Reserved
  17. #
  18. #
  19. ***********************************************************************/
  20.  
  21. #include <Displays.h>
  22.  
  23. //----------------------------------------------------------------------
  24. //
  25. //    Aevt
  26. //
  27. //----------------------------------------------------------------------
  28.  
  29. OSErr             AEInit(void);
  30. void             AEDispose(void);
  31. pascal OSErr    DoAEOpenApp(AppleEvent *event,AppleEvent reply,long refCon);
  32. pascal OSErr    DoAEQuitApp(AppleEvent *event,AppleEvent reply,long refCon);
  33. pascal OSErr    DoAEOpenDoc(AppleEvent *event,AppleEvent reply,long refCon);
  34. pascal OSErr    DoAEPrintDoc(AppleEvent *event,AppleEvent reply,long refCon);
  35. OSErr             GotAEParams(AppleEvent *appleEvent);
  36.  
  37.  
  38. //----------------------------------------------------------------------
  39. //
  40. //    Initialize
  41. //
  42. //----------------------------------------------------------------------
  43.  
  44. OSErr            Initialize(void);
  45. void            ToolBoxInit(void);
  46. void             CheckEnvironment(void);
  47. OSErr             InitApp(void);
  48. void             MenuSetup(void);
  49.  
  50.  
  51. //----------------------------------------------------------------------
  52. //
  53. //    Main
  54. //
  55. //----------------------------------------------------------------------
  56.  
  57.  
  58. void             HandleError(short errNo,Boolean fatal);
  59. void             HandleAlert(short alertID);
  60.  
  61.  
  62. //----------------------------------------------------------------------
  63. //
  64. //    Events
  65. //
  66. //----------------------------------------------------------------------
  67.  
  68. void            EventLoop(void);
  69. short             MyGetSleep(void);
  70. void             CustomWindowEvent(short eventType,WindowRef window,void *refCon);
  71. void             DoEvent(EventRecord *event);
  72. void             DoIdle(WindowRef window, void *refCon);
  73. void             HandleMouseDown( EventRecord *event );
  74. void             HandleMenuChoice( WindowRef window, void *refCon );
  75. void            HandleContentClick( WindowRef window, void *refCon );
  76. void             HandleZoomClick( WindowRef window, void *refCon );
  77. void             HandleGrow(WindowRef window, void *refCon);
  78. void             UpdateWindow(WindowRef window);
  79. void             DoActivate(WindowRef window, void *refCon);
  80.  
  81.  
  82. //----------------------------------------------------------------------
  83. //
  84. //    Windows
  85. //
  86. //----------------------------------------------------------------------
  87.  
  88. WindowPtr         CreateWindow(short resID, void *wStorage, Rect *bounds, Str255 title,
  89.                             Boolean visible, short procID,short kind, WindowRef behind,
  90.                             Boolean goAwayFlag,long refCon);
  91. OSErr             RemoveWindow(WindowRef window);
  92. void             NewWindowTitle(WindowRef window, Str255 str);
  93. OSErr             InitWindowProcs(WindowRef window, short windKind);
  94. GWorldPtr        PictToWorld(PicHandle pict, OSErr *rtnErr);
  95. void            DrawWindow( WindowRef window, void *refCon );
  96. void             DrawAboutWindow( WindowRef window, void *refCon );
  97. void             DoResizeWindow (WindowRef window);
  98. short             GetWindKind(WindowRef window);
  99. Boolean            GetIsAppWindow(WindowRef window);
  100. Boolean         GetIsAboutWindow( WindowRef window );
  101.  
  102.  
  103. //----------------------------------------------------------------------
  104. //
  105. //    Displays
  106. //
  107. //----------------------------------------------------------------------
  108.  
  109. OSErr             InstallAEDMNotification(void);
  110. pascal OSErr     WorldChangedProc(AppleEvent event,AppleEvent reply,long refCon);
  111. OSErr             HandleNotification(AppleEvent *event);
  112. OSErr             HandleDeviceChange(DisplayIDType displayID, Rect *newRect);
  113. Boolean         OutOfBoundsRect(Rect windRect, Rect screenRect);
  114. void             MoveInbounds(WindowRef window, GDHandle gd, Rect screenRect);
  115. void            ResizeInbounds(WindowRef window, GDHandle gd, Rect screenRect);
  116. GDHandle         GetGreatestDevice(WindowRef window);
  117. void             ResetStdState(WindowRef window);
  118. short             GetWTitleHeight(WindowRef window);
  119.  
  120.  
  121. //----------------------------------------------------------------------
  122. //
  123. //    Scrolls
  124. //
  125. //----------------------------------------------------------------------
  126.  
  127. void             InstallScrollBars(WindowRef window, DocHnd doc);
  128. void             AdjustScrollValues(WindowRef window);
  129. void             AdjustScrollbars(WindowRef window, Boolean resize);
  130. pascal void     ScrollActionProc(ControlRef control, short part);
  131. void            ScrollPict(short hAmount,short vAmount,WindowRef window);
  132. void             MyScrollPicture(WindowRef window, short hs, short vs);
  133. void             GetContRect(WindowRef window,Rect *contRect);
  134.  
  135.  
  136. //----------------------------------------------------------------------
  137. //
  138. //    Utils
  139. //
  140. //----------------------------------------------------------------------
  141.  
  142. void            DoOpenNew(void);    
  143. PicHandle         ReadFile(FSSpec spec);
  144. void            ZeroRect(Rect *r);
  145. void             pstrcpy(StringPtr dst, StringPtr src);
  146. void             pstrcat(StringPtr dst, StringPtr src);